package ads_config

import (
	"server/middleware"

	"github.com/gin-gonic/gin"
)

type AdsConfigRouter struct {
}

func (s *AdsConfigRouter) InitAdsConfigRouter(Router *gin.RouterGroup) {
	adsConfigRouter := Router.Group("adsConfig").Use(middleware.OperationRecord())
	adsConfigRouterWithoutRecord := Router.Group("adsConfig")
	var adsConfigApi = AdsConfigApi{}
	{
		adsConfigRouter.POST("createAdsConfig", adsConfigApi.CreateAdsConfig)
		adsConfigRouter.DELETE("deleteAdsConfig", adsConfigApi.DeleteAdsConfig)
		adsConfigRouter.DELETE("deleteAdsConfigByIds", adsConfigApi.DeleteAdsConfigByIds)
		adsConfigRouter.PUT("updateAdsConfig", adsConfigApi.UpdateAdsConfig)
	}
	{
		adsConfigRouterWithoutRecord.GET("findAdsConfig", adsConfigApi.FindAdsConfig)
		adsConfigRouterWithoutRecord.GET("getAllAdsConfigs", adsConfigApi.GetAllAdsConfigs)
		adsConfigRouterWithoutRecord.GET("getAdsConfigList", adsConfigApi.GetAdsConfigList)
		adsConfigRouterWithoutRecord.POST("getAdsConfig", adsConfigApi.GetAdsConfig)
	}
}
